<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
                <script type="text/javascript" src="lib/html5shiv.js"></script>
                <script type="text/javascript" src="lib/respond.min.js"></script>
                <![endif]-->
    <link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />

    <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="./../lib/zoomify/zoomify.css" />
    <link rel="stylesheet" href="./../lib/layui/css/layui.css">
    <!--[if IE 6]>
                <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
                <script>DD_belatedPNG.fix('*');</script>
                <![endif]-->
</head>

<body>
    <div class="page-container">
        <form action="" method="post" class="form form-horizontal" id="form-article-add">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">投诉类型：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <select name="" style="width:100%;" disabled="disabled"  class="input-text" id="status" readonly="readonly" style="width:15%;margin-left: 1%">
                        <option value="0">建议/意见</option>
                        <option value="1">投诉/举报</option>
                        <option value="2">账号被盗</option>
                        <option value="3">其他</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">投诉内容：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <input type="text" class="input-text" readonly="readonly" value="" placeholder="" id="content" name="">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2">投诉截图：</label>
                <div class="formControls col-xs-8 col-sm-9" id="img"></div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;关闭&nbsp;&nbsp;</button>
                </div>

            </div>
        </form>
    </div>
    <script src="./../static/jquery.min.js"></script>
    <script type="text/javascript" src="./../static/js/common.js"></script>
    <script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="./../lib/layui/layui.js"></script>
    <script type="text/javascript" src="./../lib/zoomify/zoomify.js"></script>
    <script>
        var parentId = parent.$("#details_id").val();
        layui.use('form', function () {
			var form = layui.form;
		});
        $(function () {
            $.ajax({
                type: "post",
                xhrFields: { withCredentials: true },
                url: admin_url + '/kvmComplaint/complaint',
                data: { tokenUserId: userId, token: token, id: parentId },
                success: function (data) {
                    console.log(data)
                    if(data.code == 200){
                   $("#status").val(data.data.type)
                   $("#content").val(data.data.content)
                    var img = (data.data.images).split(",");
                        for(var i = 0; i < img.length;i++){
                            if(img[i] == '(null)' || img[i] == ''){

                            }else{
                            $("#img").append('<img style = "width:300px;height:auto;margin:10px;" src = "' + img[i] + '">')
                            }
                        }
                    }
                    $('#img img').zoomify();
                }, error: function () {

                }
            })
        })
        // 取消功能
		function layer_close() {
			var index = parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
		}
    </script>
</body>

</html>